package com.xianggu.designMode.combination.demo01;

/**
 * @author chengjy
 * @date 2025/3/15
 */
public class Demo {
    public static void main(String[] args) {
    MenuComponent menu = new Menu("系统菜单",1);

    MenuComponent menu1 = new Menu("菜单管理",2);
    menu1.addAll(new MenuItem("页面访问",3), new MenuItem("展开菜单",3), new MenuItem("编辑菜单",3), new MenuItem("删除菜单",3), new MenuItem("新增菜单",3) );

    MenuComponent menu2 = new Menu("权限配置",2);
    menu2.addAll(new MenuItem("页面访问",3), new MenuItem("提交保存",3));

    MenuComponent menu3 = new Menu("角色管理",2);
        menu3.addAll(new MenuItem("页面访问",3), new MenuItem("新增角色",3), new MenuItem("修改角色",3));

    menu.addAll(menu1,menu2,menu3);

    menu.print();
    }
}
